package com.th.supcom.pds.dispensedrug.client.service;

import java.util.List;

import net.carefx.framework.container.client.exception.UiException;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.th.supcom.pds.auditprescription.client.model.PdsPrescDetailCombineModel;
import com.th.supcom.pds.common.client.commom.PdsAuditPrescServiceFactory;
import com.th.supcom.pds.common.client.model.PdsSupplyDetailModel;
import com.th.supcom.pds.common.client.model.PdsSupplyModel;
import com.th.supcom.pds.internal.client.model.ResultModel;

/**
 * 核对发药服务接口.
 * 
 * @author 杨冲
 */
@RemoteServiceRelativePath (PdsAuditPrescServiceFactory.BASE_URL + "dispensedrug.do")
public interface DispenseDrugRpc extends RemoteService
{

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";

    /**
     * 处方发药
     * 
     * @param model
     * @throws UiException
     */
    public void dispenseDrug (List <PdsSupplyDetailModel> models, String operator, String deptCode, String patientId) throws UiException;

    /**
     * 根据执行科室和药品编码查询批次号
     * 
     * @param pdsPrescDetailCombine
     * @return List
     */
    public List <PdsPrescDetailCombineModel> getPhamBatchByExample (PdsPrescDetailCombineModel model) throws UiException;

    /**
     * 根据PdsSupplyModel对象查询供药信息列表
     * 
     * @param pdsSupplyModel
     * @return
     * @throws UiException
     */
    public List <PdsSupplyModel> getPdsSupplyListByExample (PdsSupplyModel pdsSupplyModel) throws UiException;

    /**
     * 根据收据单号、处方号、药房查询处方供药信息明细列表
     * 
     * @param rcptNo
     * @param prescNo
     * @param deptCode
     * @return
     * @throws UiException
     */
    public ResultModel getPdsSupplyDetailListByRcptNo (String rcptNo, String prescNo, String deptCode) throws UiException;

    /**
     * 根据科室代码获取供药信息
     * @param deptCode
     * @param ipAdress
     * @return
     * @throws UiException
     */
    public List <PdsSupplyModel> findPdsSupplyListWithTotalPrice (String deptCode, String ipAdress) throws UiException;
}